import request from '@/utils/request'

// 工段信息查询
export function checkWorkSecInfo(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/sectionPage'
  })
}

// 添加工段信息
export function addWorkSecInfo(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/saveSectionInfo'
  })
}

// 修改工段信息
export function changeWorkSecInfo(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/updateSectionInfo'
  })
}

// 根据工段ID删除工段信息
export function deleteWorkSecInfo(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/delSectionInfo'
  })
}

// 根据工段编号搜索工号是否存在,在输入工段号以后对输入框内容进行验证
export function WorkSecExist(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/checkSectionNo'
  })
}

// 修改工段状态-关闭/开启
export function WorkStatusSwitch(params) {
  return request({
    method: 'POST',
    params,
    url: '/back/sectionInfo/changeSectionStatus'
  })
}

// 获取工作中心
export function getCenter(params) {
  return request({
    method: 'GET',
    params,
    url: '/back/departmentClass/getWokeCenterList'
  })
}
